public class Main {
    public static void main(String[] args) {
        int[] originalArray = {1, 2, 3};
        System.out.println("Original array: ");
        printArray(originalArray);

        transform(originalArray);

        System.out.println("Array after transformation: ");
        printArray(originalArray);
    }

    // 方法：将数组中的每个元素乘以2
    public static void transform(int[] array) {
        for (int i = 0; i < array.length; i++) {
            array[i] *= 2;
        }
    }

    // 方法：打印数组
    public static void printArray(int[] array) {
        for (int value : array) {
            System.out.print(value + " ");
        }
        System.out.println();
    }
}
